document.write('<script type="text/javascript">
var showPopup = true;

if (getCookie("popupOverlay") != null)
{
    showPopup = false;
}

var popupOverlay=document.getElementById("popupOverlay");
var popupBox=document.getElementById("popupBox");

if(showPopup==true){
	popupBox.style.display="block";
	popupOverlay.style.display="block";
   
}

function doClose(){
	popupBox.style.display="none";
	popupOverlay.style.display="none";
	var exp = new Date();    
	exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24));
	setCookie('popupOverlay','1', exp);
}

function setCookie(name, value, expires) {
  document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString());
}

function getCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
	var j = i + alen;
	if (document.cookie.substring(i, j) == arg) {
    
   	return getCookieVal (j);
  	}
	i = document.cookie.indexOf(" ", i) + 1;
	if (i == 0) break;
	}
  return null;
  }

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
</script>');